Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #6666 onMonthChange prop not being called when user increments / decrements month using arrow buttons. #6799

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

PuppetFoam
Copy link
Contributor

navForward / navBackward now calls onMonthChange (if defined).

Fix #6666

Description

navForward / navBackward methods (called when user interacts with the increment / decrement month buttons) were not calling onMonthChange.

Changes

  • New variable to store incrementYear() / decrementYear() to avoid extra call.
  • Check if onMonthChange prop is defined, and call with the month and year.

navForward / navBackward now calls onMonthChange (if defined).
Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 4:19pm
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 4:19pm

Copy link
Member

@melloware melloware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run npm run format on the code its failing the prettier check

@melloware melloware added the Type: Bug Issue contains a defect related to a specific component. label Jun 26, 2024
Copy link
Contributor Author

@PuppetFoam PuppetFoam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ran npm run format

@melloware melloware merged commit 9ac4ce6 into primefaces:master Jun 26, 2024
5 checks passed
@PuppetFoam PuppetFoam deleted the fix_onmonthchange branch June 26, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calendar: onMonthChange callback works incorrectly
2 participants